An electrophotographic-type image forming apparatus includes an exposure device that exposes a photosensitive member to light. Hence, it is preferable that, when a cover is opened, light such as laser light emitted from the exposure device does not leak to the outside. A known image forming apparatus is provided with a shutter and an open/close sensor switch. The shutter mechanically blocks laser light when the cover is opened. The open/close sensor switch mechanically detects an open/close state of the cover.